//
//  PersonalCentreViewController.m
//  A段项目,漫画
//
//  Created by dlios on 15-4-23.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "PersonalCentreViewController.h"
#define WIDTH self.view.frame.size.width
#define HEIGHT self.view.frame.size.height
@interface PersonalCentreViewController ()

@end

@implementation PersonalCentreViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"个人中心";
    
    [self creatPersonalView];
}

#pragma mark 视图设置
-(void)creatPersonalView
{
    self.mySaveButton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.mySaveButton.frame = CGRectMake(100, 84, WIDTH - 200, 50);
    self.mySaveButton.layer.borderWidth = 1;
    self.mySaveButton.layer.cornerRadius = 5;
    [self.mySaveButton setTitle:@"我的收藏" forState:UIControlStateNormal];
    [self.mySaveButton addTarget:self action:@selector(clickmySave) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.mySaveButton];
    
    self.imagineButton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.imagineButton.frame = CGRectMake(100, 144, WIDTH - 200, 50);
    self.imagineButton.layer.borderWidth = 1;
    self.imagineButton.layer.cornerRadius = 5;
    [self.imagineButton setTitle:@"应用推荐" forState:UIControlStateNormal];
    [self.imagineButton addTarget:self action:@selector(clickImagine) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.imagineButton];
    
    self.historyButton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.historyButton.frame = CGRectMake(100, 204, WIDTH - 200, 50);
    self.historyButton.layer.borderWidth = 1;
    self.historyButton.layer.cornerRadius = 5;
    [self.historyButton setTitle:@"我的历史" forState:UIControlStateNormal];
    [self.historyButton addTarget:self action:@selector(clickhistory) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.historyButton];
    
    self.leaveButton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.leaveButton.frame = CGRectMake(100, 324, WIDTH - 200, 50);
    self.leaveButton.layer.borderWidth = 1;
    self.leaveButton.layer.cornerRadius = 5;
    [self.leaveButton setTitle:@"退出登录" forState:UIControlStateNormal];
    [self.leaveButton addTarget:self action:@selector(clickleave) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.leaveButton];
    
    self.clearButton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.clearButton.frame = CGRectMake(100, 264, WIDTH - 200, 50);
    self.clearButton.layer.borderWidth = 1;
    self.clearButton.layer.cornerRadius = 5;
    [self.clearButton setTitle:@"清除记录" forState:UIControlStateNormal];
    [self.clearButton addTarget:self action:@selector(clickclear) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.clearButton];
    
}

//按钮点击方法
-(void)clickmySave
{
    NSLog(@"我的收藏");
}

-(void)clickImagine
{
    NSLog(@"应用推荐");
}

-(void)clickhistory
{
    NSLog(@"我的历史");
}

-(void)clickclear
{
    NSLog(@"清除记录");
}

-(void)clickleave
{
    NSLog(@"退出登录");
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
